class CreateBikes < ActiveRecord::Migration[5.0]
  def change
    create_table :bikes do |t|
      t.integer :user_id
      t.string :licenseNum, index: true, nil: false, comment: "车牌号"
      t.string :antiTheftCode, comment: '防盗码'
      t.string :recordDate, comment: "备案日期"
      t.integer :status, default: 0, comment: '车辆状态'
      t.string :lockAddress, comment: "锁车地址"
      t.string :markLat, default: 0, comment: "用户标记经度"
      t.string :markLng, default: 0, comment: "用户标记维度"
      t.string :out_id, null: false, index: true, unique: true, comment: "第三方主键"
    end
  end
end
